﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace QuanLyKhachSan
{
    public partial class frmQuanLyKhachHang : Form
    {
        public frmQuanLyKhachHang()
        {
            InitializeComponent();
        }
        private void frmQuanLyKhachHang_Load(object sender, EventArgs e)
        {
            //Lấy giờ hệ thống
            string gio = DateTime.Now.ToLongTimeString();
            string ngay = DateTime.Now.ToLongDateString();
            string chuoi = ngay + " " + gio;
            txtNgayHienTai.Text = chuoi;
        }

        private void btnThem_Click(object sender, EventArgs e)
        {
            txtTen.Enabled = true;
            txtTenDem.Enabled = true;
            txtHo.Enabled = true;
            txtCMND.Enabled = true;
            txtDiaChi.Enabled = true;
            cboLoaiKhachHang.Enabled = true;

            btnLuu.Enabled = true;
        }

        private void btnCapNhat_Click(object sender, EventArgs e)
        {
            txtTen.Enabled = true;
            txtTenDem.Enabled = true;
            txtHo.Enabled = true;
            txtCMND.Enabled = true;
            txtDiaChi.Enabled = true;
            cboLoaiKhachHang.Enabled = true;

            btnLuu.Enabled = true;
        }

        private void btnLuu_Click(object sender, EventArgs e)
        {
            txtTen.Enabled = false ;
            txtTenDem.Enabled = false ;
            txtHo.Enabled = false ;
            txtCMND.Enabled = false ;
            txtDiaChi.Enabled = false ;
            cboLoaiKhachHang.Enabled = false ;

            btnLuu.Enabled = false ;
        }

        private void btnThoát_Click(object sender, EventArgs e)
        {
            this.Close();
        }

      
        
    }
}